/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package battleship.game;

import sun.applet.resources.MsgAppletViewer;
import util.MsgPrinter;

/**
 *
 * @author ali
 */
public class StateGameEnd extends AbstractState{

    private static StateGameEnd instance;

    public static StateGameEnd getinstance(){
        if(instance == null){
            instance = new StateGameEnd();
        }
        return instance;
    }
    @Override
    public void execute() {
        MsgPrinter.print("Game ended");
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public StateType getNextState() {
        System.exit(0);
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
